<template>
  <div >
    <!-- 基本信息 -->
    <div class="mt10" style=" display: flex;border-bottom: 1px solid #ebedf0;">
      <div class="blue_item" />
      <span class="font15" style="display: flex; line-height: 33px;margin-left:5px;  flex:1;">商机基本信息</span>
    </div>
    <van-field :readonly="canEditbusinessName!=true" :right-icon="canEditbusinessName ? 'arrow' : ''" rows="1" type="textarea"
               autosize required name="businessName" :value="fromdatabusinessName" v-model="fromdatabusinessName" label="商机名称：" label-width="5em" />
    <van-field readonly name="businessId" :value="fromdata.businessId" label="商机编号：" label-width="5em" />
    <van-field readonly required name="businessIndustryType" :value="fromdata.businessIndustryType" label="客户行业（商机）：" label-width="9em" />
    <van-field readonly required name="busiOpportSourceName" :value="busiOpportSourceName" label="商机来源：" label-width="5em" />
    <van-field v-if="fromdata.busiOpportSource=='3'" readonly required name="contactPerson" :value="fromdata.contactPerson" label="客户联系人：" label-width="6em" />
    <van-field v-if="fromdata.busiOpportSource=='3'" readonly required name="contactPersonPhone" :value="fromdata.contactPersonPhone" label="客户联系人电话：" label-width="8em" />
    <van-field readonly required name="isInternationalBusi" :value="fromdata.isInternationalBusi==1?'是':'否'" label="是否政企国际业务：" label-width="9em" />
    <van-field readonly required name="securityLevelName" :value="securityLevelName" label="保密级别：" label-width="5em" />

    <div class="mt10" style=" display: flex;border-bottom: 1px solid #ebedf0;">
      <div class="blue_item" />
      <span class="font15" style="display: flex; line-height: 33px;margin-left:5px;  flex:1;">商机业务信息</span>
    </div>
    <van-field readonly label="业务预估金额：" label-width="7em" />
    <el-table :data="splitList" border style="width: 100%">
      <el-table-column prop="businessOppCategory" label="商机业务大类" />
      <el-table-column prop="estBusinessAmount" label="业务预估金额(万元)" />
    </el-table>
    <van-field readonly required name="custRelationshipName" :value="custRelationshipName" label="客情关系：" label-width="5em" />
    <van-field readonly required name="preAmount" :value="fromdata.preAmount" label="商机预估总金额（万元）：" label-width="12em" />
    <van-field v-if="fromdata.preAmount>50" readonly required name="preAmountY" :value="fromdata.preAmountY" label="预估金额（元）：" label-width="8em" />
    <van-field readonly required name="businessGrade" :value="fromdata.businessGrade" label="商机分级：" label-width="5em" />
    <div v-if="fromdata.projectBudget>300">
      <van-field readonly required name="bigOrderMgrName" :value="fromdata.bigOrderMgrName" label="大单客户经理姓名：" label-width="9em" />
      <van-field readonly required name="bigOrderMgrPhone" :value="fromdata.bigOrderMgrPhone" label="大单客户经理电话：" label-width="9em" />
      <van-field readonly required name="bigOrderMgrCode" :value="fromdata.bigOrderMgrCode" label="大单客户经理工号：" label-width="9em" />
    </div>
    <van-field readonly required name="projectUrgencyName" :value="projectUrgencyName" label="项目紧急程度：" label-width="7em" />
    <van-field readonly required name="businessStatus" :value="fromdata.businessStatus" label="商机状态：" label-width="5em" />
    <van-field readonly required name="expectedSigningTime" :value="fromdata.expectedSigningTime" label="预计签约时间：" label-width="7em" />
    <van-field readonly required name="crossDomainTypeName" :value="crossDomainTypeName" label="业务跨域类型：" label-width="7em" />
    <van-field readonly required name="implementationPlanName" :value="implementationPlanName" label="项目实施方案：" label-width="7em" />
    <van-field readonly name="involvedProducts" :value="fromdata.involvedProducts" label="涉及具体产品类目：" label-width="9em" />
    <van-field readonly required name="isMarketActivities" :value="fromdata.isMarketActivities=='1'?'是':'否'" label="是否参加总部营销活动：" label-width="11em" />
    <van-field v-if="fromdata.isInternationalBusi==1" readonly name="involvedProductSubInter" :value="fromdata.involvedProductSubInter" label="涉及政企国际的二级产品：" label-width="12em" />
    <van-field v-if="fromdata.involvedProducts=='移动云'" readonly name="involvedProductSub" :value="fromdata.involvedProductSub" label="涉及移动云的二级产品：" label-width="11em" />
    <van-field v-if="fromdata.involvedProducts=='移动云'" readonly name="cloudImportProduct" :value="fromdata.cloudImportProduct" label="移动云重点产品：" label-width="8em" />
    <!--    <van-field readonly name="involvedSolutions" :value="fromdata.involvedSolutions" label="涉及具体解决方案：" label-width="9em" />-->
    <van-field readonly required name="customerDeliveryTime" :value="fromdata.customerDeliveryTime" label="客户预期交付时间：" label-width="9em" />
    <van-field readonly required name="customerDeliveryPlaceName" :value="customerDeliveryPlaceName" label="客户预期交付地点：" label-width="9em" />
    <van-field v-if="fromdata.cloudImportProduct&&fromdata.cloudImportProduct.indexOf('智算')" readonly required label="智算表单信息:" label-width="7em" />
    <el-table v-if="fromdata.cloudImportProduct&&fromdata.cloudImportProduct.indexOf('智算')" :data="fromdata.zsCardInfoList" border style="width: 100%">
      <el-table-column prop="cardNeedType" label="智算卡需求类型" />
      <el-table-column prop="needCount" label="智算卡需求量" />
    </el-table>
    <van-field readonly name="fiveGSubdivisions" :value="fromdata.fiveGSubdivisions" label="涉及具体5G细分行业：" label-width="10.5em" />
    <div class="mt10" style=" display: flex;border-bottom: 1px solid #ebedf0;">
      <div class="blue_item" />
      <span class="font15" style="display: flex; line-height: 33px;margin-left:5px;  flex:1;">商机转支撑</span>
    </div>
    <van-field readonly required name="businessConvertDate" :value="fromdata.businessConvertDate" label="商机转支撑日期：" label-width="8em" />
    <van-field readonly required name="presalePersonName" :value="fromdata.presalePersonName" label="售前支撑人员姓名：" label-width="9em" />
    <van-field readonly required name="presalePersonOa" :value="fromdata.presalePersonOa" label="售前支撑人员账号：" label-width="9em" />
    <van-field readonly required name="preSaleSupportPhone" :value="fromdata.preSaleSupportPhone" label="售前支撑人员联系方式：" label-width="11em" />
    <van-field readonly required name="isSupport" :value="fromdata.isSupport" label="是否生成方案支撑待办工单：" label-width="13em" />
    <div class="mt10" style=" display: flex;border-bottom: 1px solid #ebedf0;">
      <div class="blue_item" />
      <span class="font15" style="display: flex; line-height: 33px;margin-left:5px;  flex:1;">省侧行业信息</span>
    </div>
    <van-field readonly required name="industryBigTypeProvince" :value="fromdata.industryBigTypeProvince" label="省内行业大类：" label-width="7em" />
    <van-field readonly required name="industryBigTypeGroup" :value="fromdata.industryBigTypeGroup" label="集团行业大类：" label-width="7em" />
    <van-field readonly required name="industryMinTypeGroup" :value="fromdata.industryMinTypeGroup" label="集团行业小类：" label-width="7em" />
    <div class="mt10" style=" display: flex;border-bottom: 1px solid #ebedf0;">
      <div class="blue_item" />
      <span class="font15" style="display: flex; line-height: 33px;margin-left:5px;  flex:1;">一级DICT行业信息</span>
    </div>
    <van-field readonly required name="industryName" :value="fromdata.industryName" label="15大行业名称：" label-width="7.5em" />
    <van-field readonly required name="industryNameOneLevel" :value="fromdata.industryNameOneLevel" label="行业一级名称：" label-width="7em" />
    <van-field readonly required name="industryNameTwoLevel" :value="fromdata.industryNameTwoLevel" label="行业二级名称：" label-width="7em" />
    <div class="mt10" style=" display: flex;border-bottom: 1px solid #ebedf0;">
      <div class="blue_item" />
      <span class="font15" style="display: flex; line-height: 33px;margin-left:5px;  flex:1;">外部合作伙伴支撑信息</span>
    </div>
    <van-field readonly required name="partnerSupportNeeds" :value="fromdata.partnerSupportNeeds" label="外部合作伙伴支撑需求：" label-width="11em" />
    <van-field v-if="fromdata.partnerSupportNeeds=='有'" readonly required name="partnerName" :value="fromdata.partnerName" label="外部合作伙伴名称：" label-width="9em" />
    <div class="mt10" style=" display: flex;border-bottom: 1px solid #ebedf0;">
      <div class="blue_item" />
      <span class="font15" style="display: flex; line-height: 33px;margin-left:5px;  flex:1;">标签专区</span>
    </div>
    <van-field readonly name="isSpecialDebt" :value="fromdata.isSpecialDebt==1?'是':'否'" label="是否专项债：" label-width="6em" />
    <van-field readonly required name="isIncludeSolution" :value="fromdata.isIncludeSolution == 1 ? '是' : '否'" label="是否包含三化解决方案:" label-width="11em" />
    <div v-if="fromdata.isIncludeSolution == 1">
      <van-field readonly label="三化解决方案信息：" label-width="9em" />
      <el-table :data="fromdata.includeSolutionList" :header-cell-style="{ textAlign: 'center' }" :cell-style="{ textAlign: 'center' }" border
                style="width: 100%">
        <el-table-column prop="solutionInfoName" label="三化方案名称" width="140" />
        <el-table-column prop="solutionInfoCode" label="三化方案编码" width="120" />
        <el-table-column prop="solutionInfoAmount" label="三化预估金额（含税、万元）" width="150" />
      </el-table>
    </div>
    <van-field readonly required name="isVideoNet" :value="fromdata.isVideoNet == 1 ? '是' : '否'" label="是否包含视联网能力:" label-width="11em" />
    <div class="redtext font11" style="margin: 5px 15px 0px 15px;">
      视联网能力说明：当商机内容包含视联网关键字，如“视频、监控、雪亮、应急、摄像头、球机、枪机、千里眼、云视讯、和对讲”等，则选择“是”。
    </div>
    <van-field v-if="fromdata.isVideoNet == 1" readonly required name="videoNetInfoAmount" :value="fromdata.videoNetInfoAmount" label="视联网能力收入金额(含税)(万元):" label-width="11em" />
    <van-field v-if="fromdata.isVideoNet == 1" readonly required name="incomeRate" :value="fromdata.incomeRate" label="视联网能力收入占比(%):" label-width="11em" />
    <van-field v-if="fromdata.isVideoNet == 1" readonly required name="connectionsNum" :value="fromdata.connectionsNum" label="视联网能力连接数:" label-width="9em" />
    <div v-if="fromdata.isVideoNet == 1" class="redtext font11" style="margin: 5px 15px 0px 15px;">
      视联网能力说明：当商机内容包含视联网关键字，如“视频、监控、雪亮、应急、摄像头、球机、枪机、千里眼、云视讯、和对讲”等，则选择“是”。
    </div>
    <!--AI打标签-->
    <van-field readonly required name="isAiAbility" :value="fromdata.isAiAbility == 1 ? '是' : '否'" label="是否包含AI能力:" label-width="8em" />
    <van-field v-if="fromdata.isAiAbility == 1" readonly required name="aiAbilityType" :value="fromdata.aiAbilityType" label="AI能力分类:" label-width="6em" />
    <van-field v-if="fromdata.isAiAbility == 1" readonly required name="aiAbilityAmount" :value="fromdata.aiAbilityAmount" label="AI能力收入金额(含税)(万元):" label-width="14em" />
    <van-field v-if="fromdata.isAiAbility == 1" readonly required name="aiIncomeRate" :value="fromdata.aiIncomeRate" label="AI能力收入占比(%):" label-width="10em" />
    <div class="redtext font11" style="margin: 5px 15px 0px 15px;">
      AI能力说明: 当项目包含各类A业务场景，中是否包含安全产品*如智眉大模型、AI产品、AI行业应用、AI大模型服务等，则选择“是”。
    </div>
    <!--    安全产品-->
    <van-field readonly required name="isSafeProduct" :value="fromdata.isSafeProduct == 1 ? '是' : '否'" label="是否包含安全产品:" label-width="8.5em" />
    <van-field v-if="fromdata.isSafeProduct == 1" readonly required name="safeProductAmount" :value="fromdata.safeProductAmount" label="安全产品收入金额（含税，万元）:" label-width="11em" />
    <van-field v-if="fromdata.isSafeProduct == 1" readonly required name="safeIncomeRate" :value="fromdata.safeIncomeRate" label="安全产品收入占比(%):" label-width="11em" />
    <div class="redtext font11" style="margin: 5px 15px 0px 15px;">
      安全产品说明：当项目包含各类安全业务场景，安全业务场景指：在垂直行业ICT解项目中，提供等保合规类、密码安全类、数据安全类、工业安全类、供应链安全类、云安全类、车联网安全类、5G/6G安全、安全服务（咨询、规划、重保、攻防、应急响应、靶场、培训等）相关产品和支撑服务，帮助客户建立健全信息系统及网络安全防护体系，保护系统和数据不受威胁，提升其安全性、稳定性、可靠性和合规性等，则选择“是”。
    </div>
    <van-field readonly required name="isAbility" :value="fromdata.isAbility == 'true' ? '是' : '否'" label="是否适用融自有能力:" label-width="10em" />
    <van-field v-if="fromdata.isAbility == 'true'" readonly required name="abilitySelect" autosize type="textarea" rows="1" :value="fromdata.abilitySelect" label="融自有能力甄别：" label-width="8em"/>
    <div v-if="fromdata.isSpecialDebt==1">
      <div class="mt10" style=" display: flex;border-bottom: 1px solid #ebedf0;">
        <div class="blue_item" />
        <span class="font15" style="display: flex; line-height: 33px;margin-left:5px;  flex:1;">专项债商机信息</span>
      </div>
      <van-field readonly required name="leadOpportNumber" :value="fromdata.leadOpportNumber" label="专项债线索商机编码：" label-width="10em" />
      <dict_type_value :name='"areaOfBelonging"' :keyType='"areaOfBond"' :model='fromdata.areaOfBelonging' :label='"所属领域："' />
      <van-field readonly required name="areaOfBelongRemark" :value="fromdata.areaOfBelongRemark" label="所属领域说明：" label-width="7em" />
      <van-field readonly required name="lastVisitDate" :value="fromdata.lastVisitDate" label="最近一次走访时间：" label-width="9em" />
      <dict_type_value :name='"isNeedOnSite"' :model='fromdata.isNeedOnSite' :label='"是否需要专人驻场："' />
      <dict_type_value :name='"currentStage"' :model='fromdata.currentStage' :label='"专项债当前环节："' />
      <van-field readonly required name="colutionManagerName" :value="fromdata.colutionManagerName" label="专项债移动侧项目负责人：" label-width="12em" />
      <van-field readonly required name="otherProcessesDesc" :value="fromdata.otherProcessesDesc" label="专项债其他环节说明：" label-width="10em" />
      <van-field readonly required name="phoneNumber" :value="fromdata.phoneNumber" label="专项债移动侧项目联系方式：" label-width="13em" />
      <dict_type_value :name='"specialBondPartner"' :model='fromdata.specialBondPartner' :label='"专项债合作方："' />
      <van-field readonly required name="otherPartnersDesc" :value="fromdata.otherPartnersDesc" label="专项债其他合作方说明：" label-width="11em" />
    </div>
    <div v-if="fromdata.currentStage=='4'||fromdata.currentStage=='5'||fromdata.currentStage=='6'">
      <div class="mt10" style=" display: flex;border-bottom: 1px solid #ebedf0;">
        <div class="blue_item" />
        <span class="font15" style="display: flex; line-height: 33px;margin-left:5px;  flex:1;">专项债券信息</span>
      </div>
      <van-field readonly required name="universalBondCode" :value="fromdata.universalBondCode" label="全网债券编码：" label-width="7em" />
      <van-field readonly required name="projectName" :value="fromdata.projectName" label="债券项目统一名称：" label-width="9em" />
      <van-field readonly required name="totalInvestment" :value="fromdata.totalInvestment" label="总投资（万元）：" label-width="8em" />
      <van-field readonly required name="equityExcludBonds" :value="fromdata.equityExcludBonds" label="不含专项债的资本金（万元）：" label-width="14em" />
      <van-field readonly required name="totalAmountBonds" :value="fromdata.totalAmountBonds" label="申请专项债总额（万元）：" label-width="12em" />
      <van-field readonly required name="province" :value="fromdata.province" label="区划：" label-width="3em" />
      <van-field readonly required name="prefectureLevelCity" :value="fromdata.prefectureLevelCity" label="地市：" label-width="3em" />
      <van-field readonly required name="district" :value="fromdata.district" label="区县：" label-width="3em" />
      <dict_type_value :name='"areaOfBond"' :model='fromdata.areaOfBond' :label='"专项债所属领域："' />
      <van-field readonly required name="areaOfBondRemark" :value="fromdata.areaOfBondRemark" label="专项债所属领域说明：" label-width="10em" />
      <van-field readonly required name="anticipatedEarnings" :value="fromdata.anticipatedEarnings" label="预期收入（收益）（万元）：" label-width="13em" />
      <van-field readonly required name="cost" :value="fromdata.cost" label="成本（万元）：" label-width="7em" />
      <van-field readonly required name="revenueSources" :value="fromdata.revenueSources" label="收入来源：" label-width="5em" />
      <van-field readonly required name="constructionContent" :value="fromdata.constructionContent" label="建设内容：" label-width="5em" />
      <van-field  readonly required label="发行明细（批次）" label-width="8em" />
      <el-table  :data="fromdata.debtIssuanceInfoList" border style="width: 100%">
        <el-table-column prop="issueDate" width="100px" label="发行时间" />
        <el-table-column prop="issueAmount" label="发行额（万元）" />
        <el-table-column prop="issueRate" label="发行利率" />
        <el-table-column prop="associatedBond" label="所属债券" />
        <el-table-column prop="batchID" label="批次" />
      </el-table>

    </div>
    <div class="mt10" style=" display: flex;border-bottom: 1px solid #ebedf0;">
      <div class="blue_item" />
      <span class="font15" style="display: flex; line-height: 33px;margin-left:5px;  flex:1;">售前阶段项目定级</span>
    </div>
    <van-field readonly required name="preProjectGrade" :value="fromdata.preProjectGrade" label="售前阶段项目定级:" label-width="8.5em" />
    <div class="mt10" style=" display: flex;border-bottom: 1px solid #ebedf0;">
      <div class="blue_item" />
      <span class="font15" style="display: flex; line-height: 33px;margin-left:5px;  flex:1;">能力信息</span>
    </div>
    <van-field readonly required name="bigDataProductsState" :value="fromdata.bigDataProductsState==true?'是':'否'" label="是否使用中台能力:" label-width="8.5em" />
    <van-field v-if="fromdata.bigDataProductsState==true" readonly required label="能力名称:" label-width="7em" />
    <el-table v-if="fromdata.bigDataProductsState==true" :data="fromdata.abilityInformationModeList" border style="width: 100%">
      <el-table-column prop="abilityProvider" label="能力提供方" />
      <el-table-column prop="abilityName" label="能力名称" />
      <el-table-column prop="abilityCode" label="能力编码" />
    </el-table>
    <van-field readonly required name="abilityInformationState" :value="fromdata.abilityInformationState==true?'是':'否'" label="是否使用大数据产品:" label-width="9.5em" />
    <van-field v-if="fromdata.abilityInformationState==true" readonly required label="产品名称:" label-width="7em" />
    <el-table v-if="fromdata.abilityInformationState==true" :data="fromdata.bigDataProductsModeList" border style="width: 100%">
      <el-table-column prop="firstClassProductName" label="一级产品名称" />
      <el-table-column prop="productClass" label="产品分类" />
      <el-table-column prop="maProductName" label="产品名称" />
      <el-table-column prop="tariffCode" label="资费代码" />
      <el-table-column prop="billingMode" label="计费模式" />
    </el-table>
    <van-field readonly required name="isSecurityCapability" :value="fromdata.isSecurityCapability" label="是否使用安全能力:" label-width="8.5em" />
    <van-field v-if="fromdata.isSecurityCapability=='是'" readonly required name="securityCapability" :value="fromdata.securityCapability" label="安全能力:" label-width="4.5em" />
    <div class="mt10" style=" display: flex;border-bottom: 1px solid #ebedf0;">
      <div class="blue_item" />
      <span class="font15" style="display: flex; line-height: 33px;margin-left:5px;  flex:1;">商机有效性评估</span>
    </div>
    <van-field readonly required name="businessValidityScore" :value="fromdata.businessValidityScore" label="评估得分：" label-width="5em" />
    <van-field readonly required autosize type="textarea" rows="1" name="businessValidity" :value="fromdata.businessValidity" label="商机有效性评估：" label-width="8em" />
    <div class="mt10" style=" display: flex;border-bottom: 1px solid #ebedf0;">
      <div class="blue_item" />
      <span class="font15" style="display: flex; line-height: 33px;margin-left:5px;  flex:1;">商机价值评估</span>
    </div>
    <van-field readonly required name="businessWorthScore" :value="fromdata.businessWorthScore" label="评估得分：" label-width="5em" />
    <van-field readonly required autosize type="textarea" rows="1" name="businessWorth" :value="fromdata.businessWorth" label="商机价值评估：" label-width="7em" />
    <div class="mt10" style=" display: flex;border-bottom: 1px solid #ebedf0;">
      <div class="blue_item" />
      <span class="font15" style="display: flex; line-height: 33px;margin-left:5px;  flex:1;">商机转化能力评估</span>
    </div>
    <van-field readonly required name="businessAbilityScore" :value="fromdata.businessAbilityScore" label="评估得分：" label-width="5em" />
    <van-field readonly required autosize type="textarea" rows="1" name="businessAbility" :value="fromdata.businessAbility" label="商机转化能力评估：" label-width="9em" />
    <div class="mt10" style=" display: flex;border-bottom: 1px solid #ebedf0;">
      <div class="blue_item" />
      <span class="font15" style="display: flex; line-height: 33px;margin-left:5px;  flex:1;">商机战略卡位价值评估</span>
    </div>
    <van-field readonly required name="businessScreensTotal" :value="fromdata.businessScreensTotal" label="评估得分：" label-width="5em" />
    <van-field readonly required name="businessAssess" :value="fromdata.businessAssess" label="商机参与度评估：" label-width="8em" />
    <van-field readonly autosize type="textarea" rows="1" name="remark" :value="fromdata.remark" label="备注：" label-width="3em" />
    <van-field readonly label="说明文件：" label-width="5em" />
    <div v-for="(fileitem) in fromdata.descriptionFileList" :key="fileitem.id" style="margin-left:20px">
      <div readonly class="font14 fileLink" style="color:#0F85CF">
        <a target="_blank" @click="openFileUrlfun(fileitem.anonymousFilePath)">{{ fileitem.fileName }}</a>
      </div>
    </div>
    <div style="padding-bottom: 42px"></div>
  </div>
</template>
<script>
import {queryByType, req} from '@/api/dictapi'
import { mapGetters } from "vuex"
import SectionHeader from "@/views/sztdzj/sztdzjDetail/section-header.vue";
import dict_type_value from '@/components/dict_type_value';
import myvan_field from "@/components/myvanfield/index.vue";
import {Notify, Toast} from "vant";
import util from "@/assets/js/public";
import {openFileUrl} from "@/store/openFile";

export default {
  components: {
    myvan_field, SectionHeader,
    dict_type_value},
  data() {
    return {
      splitList:[],
      fromdatabusinessName:"",
      busiOpportSourceName:'',
      securityLevelName:"",
      custRelationshipName:"",
      projectUrgencyName:'',
      crossDomainTypeName:"",
      implementationPlanName:"",
      customerDeliveryPlaceName:""
    }
  },
  computed: {
    ...mapGetters(['user']),
  },
  props: ['businessdata','fromdata','showHistory','historydata','approveList','canEditbusinessName',],
  created() {

  },
  watch: {
    fromdata: {
      handler () { //这是vue的规定写法，当你watch的值发生变化的时候，就会触发这个handler，这是vue内部帮你做的事情
        this.fromdatabusinessName=this.fromdata.businessName
        var splitList_number1=0
        if (this.fromdata.estimatedBusinessAmountList!=null) {
          this.splitList=[]
          for (var i=0;i<this.fromdata.estimatedBusinessAmountList.length;i++) {
            splitList_number1=Number(splitList_number1)+Number(this.fromdata.estimatedBusinessAmountList[i].estBusinessAmount)
            this.splitList.push(this.fromdata.estimatedBusinessAmountList[i]);
          }
          var splitListadd={'businessOppCategory':'合计','estBusinessAmount':splitList_number1.toFixed(2)}
          this.splitList.push(splitListadd);
        }
        this.getType();
      },
      deep: true,  // 可以深度检测到 obj 对象的属性值的变化
      immediate: true //刷新加载  立马触发一次handler
    },
    fromdatabusinessName(newfromdata, oldfromdata) {
      console.log('fromdata changed'+this.fromdatabusinessName);
      this.$emit('freshData',this.fromdatabusinessName)
    }
  },
  methods: {
    openFileUrlfun(value) {
      this.$router.push({
        name: "fileview",
        query: {
          openFileUrl: openFileUrl(value),
        },
      });
    },
    getType(){
      //商机来源：
      queryByType({ dictType:'busiOpportSource'} )
          .then((result) => {
            if (!result.data) {
              Notify(result.message);
              return;
            }
            for(var i=0;i<result.data.data.length;i++){
              if(result.data.data[i].value==this.fromdata.busiOpportSource){
                this.busiOpportSourceName = result.data.data[i].name;
              }
            }
          }),
          //保密级别：
          queryByType({ dictType:'securityLevel'} )
              .then((result) => {
                if (!result.data) {
                  Notify(result.message);
                  return;
                }
                for(var i=0;i<result.data.data.length;i++){
                  if(result.data.data[i].value==this.fromdata.securityLevel){
                    this.securityLevelName = result.data.data[i].name;
                  }
                }
              }),
          //客情关系：
          queryByType({ dictType:'custRelationship'})
              .then((result) => {
                if (!result.data) {
                  Notify(result.message);
                  return;
                }
                for(var i=0;i<result.data.data.length;i++){
                  if(result.data.data[i].value==this.fromdata.custRelationship){
                    this.custRelationshipName = result.data.data[i].name;
                  }
                }
              }),
          //项目紧急程度：
          queryByType({ dictType:'projectUrgency'})
              .then((result) => {
                if (!result.data) {
                  Notify(result.message);
                  return;
                }
                for(var i=0;i<result.data.data.length;i++){
                  if(result.data.data[i].value==this.fromdata.projectUrgency){
                    this.projectUrgencyName = result.data.data[i].name;
                  }
                }
              }),
          //业务跨域类型：
          queryByType({ dictType:'crossDomainType'} )
              .then((result) => {
                if (!result.data) {
                  Notify(result.message);
                  return;
                }
                for(var i=0;i<result.data.data.length;i++){
                  if(result.data.data[i].value==this.fromdata.crossDomainType){
                    this.crossDomainTypeName = result.data.data[i].name;
                  }
                }
              }),
          //业务跨域类型：
          queryByType({ dictType:'implementationPlan'})
              .then((result) => {
                if (!result.data) {
                  Notify(result.message);
                  return;
                }
                for(var i=0;i<result.data.data.length;i++){
                  if(result.data.data[i].value==this.fromdata.implementationPlan){
                    this.implementationPlanName = result.data.data[i].name;
                  }
                }
              })
      req("dict",'countryCityConversion$api$findAllNoPage',{
        kv : {currentUserCode: util.encrypt(this.user.userName),source: "MOBILE"},
      }).then((result) => {
        Toast.clear();
        if (!result.data) {
          Notify(result.message);
          return;
        }
        for(var i=0;i<result.data.data.length;i++){
          if(result.data.data[i].cityCode==this.fromdata.customerDeliveryPlace){
            this.customerDeliveryPlaceName = result.data.data[i].cityName;
          }
        }
      })
    },
  },
}
</script>

<style>
.tables.el-table .cell {
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
  word-break: break-all;
  line-height: 15px;
  padding-left: 5px;
  padding-right: 5px;
}
</style>